package org.needcoke.hs.config;

import org.needcoke.hs.bean.InterceptRule;
import org.needcoke.hs.httpclient.HttpClientInterceptor;
import org.needcoke.hs.httpclient.HttpClientInterceptorImpl;
import org.needcoke.hs.okhttp.OkHttpInterceptor;
import org.needcoke.hs.okhttp.OkHttpInterceptorImpl;
import org.needcoke.hs.signature.Signature;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
import java.util.Map;

/**
 * http签名配置类
 *
 * @author warren
 */
@Configuration
public class HttpSignatureConfiguration {

    @Bean
    public OkHttpInterceptor defaultOkHttpInterceptor(){
        return new OkHttpInterceptorImpl();
    }

    @Bean
    public HttpClientInterceptor defaultHttpClientInterceptor(){
        return new HttpClientInterceptorImpl();
    }

    @Bean
    public Map<InterceptRule, Signature> signatureMap(){
        return new HashMap<>();
    }
}
